package com.tanhua.server.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

//使用mybatisplus映射用户表中性别
public enum SexEnum implements IEnum<Integer> {

    MAN(1, "男"),
    WOMAN(2, "女"),
    UNKNOWN(3, "未知");

    private int value;//映射表中性别代表的数值
    private String desc;//映射数字代表的中文

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.desc;
    }
}